package com.ruoyi.service.impl;
import com.ruoyi.domain.RepositoryInfo;
import com.ruoyi.mapper.RepositoryInfoMapper;
import com.ruoyi.service.IRepositoryInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RepositoryInfoServiceImpl implements IRepositoryInfoService {
    @Autowired
    RepositoryInfoMapper repositoryInfoMapper;

    @Override
    public List<RepositoryInfo> list() {
        return repositoryInfoMapper.selectList();
    }

    @Override
    public List<RepositoryInfo> listForPage(RepositoryInfo repositoryInfo) {
        return repositoryInfoMapper.selectListForPage(repositoryInfo);
    }

    @Override
    public RepositoryInfo getById(Long id) {
        return repositoryInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public int save(RepositoryInfo repositoryInfo) {
        return repositoryInfoMapper.insertSelective(repositoryInfo);
    }

    @Override
    public int updateById(RepositoryInfo repositoryInfo) {
        return repositoryInfoMapper.updateByPrimaryKeySelective(repositoryInfo);
    }

    @Override
    public int removeByIds(Long[] ids) {
        return repositoryInfoMapper.deleteByPrimaryKeys(ids);
    }
}
